<?php
session_start();
// echo $_SESSION["CheckedName"];
// echo $_SESSION["CheckTime"];
// echo $_SESSION["login"];

if (isset($_SESSION["CheckedName"]) && isset($_SESSION["CheckTime"]) && isset($_SESSION["login"])) {
    if ($_SESSION["login"] != "ok") {
        header("location: login.php");
    }
} else {
    header("location: login.php");
}

// if (isset($_SESSION["CheckedName"])&&isset($_SESSION["CheckTime"])&&isset($_SESSION["login"]) ) {
// 	header("location: login.php");
// 	if ($_SESSION["login"] != "ok") {
// 		header("location: login.php");
// 	}
// }
?>